//
//  DLDemoViewController.swift
//  新浪微博
//
//  Created by 周冰烽 on 2017/1/4.
//  Copyright © 2017年 周冰烽. All rights reserved.
//

import UIKit

class DLDemoViewController: DLBaseViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        //设置标题
        title = "第\(navigationController?.childViewControllers.count ?? 0)个"
    }
    // MARK: - 监听方法
    // 继续 push 一个新的控制器
    @objc fileprivate func showNext() {
        let vc = DLDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
        
    }
}
extension DLDemoViewController {
    //重写父类方法
    override func setupUI() {
        super.setupUI()
        //设置右侧的控制器
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", fontSize: 16, target: self, action: #selector(showNext))
    }
}
